package com.yanfan.usersmart.user.firemain.data;




import com.yanfan.usersmart.user.firemain.ByteUtil;
import lombok.Data;


/**
 * 火灾主要状态正常
 * 用户信息传输装置操作
 *
 * @author TDS
 * @date 2022/08/23
 */
@Data
public class FireMainStatusNormal {

	/**
	 * 系统类型//消防主机类型
	 */
	private Integer systemType;
	/**
	 * 系统代码//消防主机编号
	 */
	private Integer systemCode;
	/**
	 * 状态//消防主机状态
	 */
	private String status;

	private String device_id;

    public FireMainStatusNormal(String data , String deviceId){
    	this.device_id = deviceId;

		systemType = Integer.parseInt(data.substring(4,6),16);
		systemCode = Integer.parseInt(data.substring(6,8),16);
		String bit = ByteUtil.buqi(Integer.toBinaryString(Integer.parseInt(data.substring(8,12),16)));

		status = "无异常";


    }

}
